<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="../../generales/plantillas/plantillaMain.xhtml">
	<ui:define name="content">

		<h:form>

			<p:growl id="messages" showDetail="true" />

			<p:schedule value="#{reservasZonasBean.scheduleModel}" editable="true" widgetVar="myschedule">
				<p:ajax event="dateSelect" listener="#{reservasZonasBean.onDateSelect}"
				update=":eventDetails" oncomplete="eventDialog.show()" />
				<p:ajax event="eventSelect" listener="#{reservasZonasBean.onEventSelect}" />
			</p:schedule>

		</h:form>


		<p:dialog widgetVar="eventDialog" header="#{msg['form.ReservaZona.formulario.titulo']} " modal="true"
			showEffect="clip" hideEffect="clip" resizable="false">
			<h:panelGrid id="eventDetails" columns="2">
				<h:form>
					<h:panelGrid columns="2" cellpadding="3">
						<h:outputLabel value="#{msg['form.ReservaZona.titulo']} *" />
						<p:inputText value="" id="titulo" size="18" />
						<h:outputLabel for="tipoZona" value="#{msg['form.ReservaZona.tipoZona']}: *" />
						<p:selectOneMenu id="tipoZona" value="">
							<f:selectItems value="#{reservasZonasBean.tiposZona}"
								var="tipoZona" itemValue="#{tipoZona.id}"
								itemLabel="#{tipoZona.nombre}" />
						</p:selectOneMenu>
						<h:outputLabel for="zona" value="#{msg['form.ReservaZona.zona']}: *" />
						<p:selectOneMenu id="zona" value="">
							<f:selectItems value="#{reservasZonasBean.zonas}" var="zona"
								itemValue="#{zona.id}" itemLabel="#{zona.nombre}" />
						</p:selectOneMenu>
						<h:outputLabel value="#{msg['form.ReservaZona.fecha']} *" />
						<p:calendar value="#{reservasZonasBean.reserva.startDate}"
							id="startDate" pattern="yyyy/MM/dd HH:mm" size="18" />
						<h:outputLabel value="#{msg['form.ReservaZona.horas']} *" />
						<p:inputText value="" id="horas" size="2" />

						<h:outputLabel value="#{msg['form.ReservaZona.comentarios']} " />
						<p:inputTextarea value="" id="comentarios" autoResize="false"
							cols="22" rows="4" />

						<p:commandButton onclick="" value="Guardar" id="guardar"></p:commandButton>
						<p:commandButton onclick="" value="Eliminar" id="eliminar"></p:commandButton>


					</h:panelGrid>
				</h:form>
			</h:panelGrid>
		</p:dialog>

	</ui:define>
</ui:composition>
